import 'package:FlipClock/style/Theme_data.dart';
import 'package:FlipClock/routes/home_page.dart';
import 'package:FlipClock/routes/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:orientation/orientation.dart';

void main() {
  // WidgetsFlutterBinding.ensureInitialized();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
    //     overlays: []); //全屏显示
    //强制横屏
    OrientationPlugin.setPreferredOrientations([
      DeviceOrientation.landscapeLeft,
      DeviceOrientation.landscapeRight,
    ]);

    return GetMaterialApp(
      theme: appThemeData,
      initialRoute: '/',
      getPages: routePages,
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    );
  }
}
